<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <div id="box">
        <ul>
            <li v-for="(data, index) of datalist">
                {{ data }}------{{index}}
            </li>
        </ul>

        <ul>
            <!-- data相当于value的值 -->
            <li v-for="(data,key, index) in obj">  
                <!-- 对象转换成数组 -->
                {{ data }} --- {{key}} --{{index}} 

            </li>
        </ul>

        <ul>
            <!-- 对阿拉伯数字进行遍历，阿拉伯数字从1开始 -->
            <li v-for="n in 10">
                {{n}}
            </li>
        </ul>
    </div>

    <script>
        new Vue ({
            el: '#box',
            data: {
                datalist:['aaa', 'bbb', 'ccc'],
                obj:{
                    name: '张三',
                    age: 36,
                    location: 'dalian'
                }
            }
        })
    </script>
</body>
</html>